import React,{Component} from 'react'
import {Layout} from 'antd'
import './with-mon.css'
const {Header}=Layout
const spanStyle = {
    cursor:'pointer'
}

export default (titleData,Data)=> (WrappenComponent)=>{
    return class extends Component {
        constructor(){
            super()
            this.state={
            }
        }
        goHome(){
            console.log(123)
        }
        goSure(){
            console.log(321)
        }
        help(){
            console.log(456)
        }
        render() {
            return(
                <div>
                    <Layout>
                        <Header style={{ backgroundColor: '#E9ECF3',textAlign:'left',display:'flex',justifyContent:'space-between'}}>
                            <div>
                                <span style={spanStyle} onClick={this.goHome.bind(this)}>首页</span>
                                <span className='slash'>/</span>
                                <span style={spanStyle} onClick={this.goSure.bind(this)}>资金</span>
                                <span className='slash'>/</span>
                                <span>{titleData}</span>
                                <span style={Data ? {fontSize:'1rem',margin:'0 10px'}:{fontSize:'0'}}>/</span>
                                <span>{Data}</span>
                            </div>
                            <div onClick={this.help} style={{cursor:  'pointer'}}>
                                <span className='yuan'>?</span>
                                <span>帮助</span>
                            </div>
                        </Header>
                    </Layout>
                    <WrappenComponent/>


                </div>
            )
        }
    }
}